import type { Metadata, Viewport } from 'next';

export const metadata: Metadata = {
  title: {
    default: '静夜聆雨',
    template: '%s - 静夜聆雨',
  },
  keywords: ['静夜聆雨'],
  description: '静夜聆雨的个人网站',
  generator: 'Next.js',
  applicationName: '静夜聆雨的个人网站',
  referrer: 'origin-when-cross-origin',
  authors: [{ name: '静夜聆雨', url: 'https://weibo.com/gogomusicfairy' }],
  creator: '静夜聆雨',
  publisher: '静夜聆雨',
  formatDetection: {
    //是否设置把文字默认为邮箱地址
    email: true,
    //是否设置点击地址直接跳转至地图的功能
    address: true,
    //是否设置自动将你的数字转化为拨号连接
    telephone: true,
  },
  //https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/meta/name#%E5%85%B6%E4%BB%96%E5%85%83%E6%95%B0%E6%8D%AE%E5%90%8D%E7%A7%B0
  robots: {
    index: true,
    follow: true,
    noimageindex: true,
    nocache: true,
    //https://developers.google.cn/search/docs/crawling-indexing/robots-meta-tag?hl=zh-cn
    googleBot: {
      index: true,
      follow: true,
      nocache: true,
      noimageindex: true,
      'max-video-preview': -1,
      'max-image-preview': 'large',
      'max-snippet': -1,
    },
  },
};

export const viewport: Viewport = {
  width: 'device-width',
  initialScale: 1,
  minimumScale: 1,
  maximumScale: 1,
  userScalable: false,
};
